package com.navi.loaddata.core.mesEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by ghost on 2018/3/20.
 */
public class MesCtPospairproductPK implements Serializable {
    private String factoryname;
    private String productspecname;
    private String productspecversion;
    private String actiontype;
    private String destfactoryname;
    private String destproductspecname;
    private String destproductspecversion;

    @Column(name = "FACTORYNAME")
    @Id
    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    @Column(name = "PRODUCTSPECNAME")
    @Id
    public String getProductspecname() {
        return productspecname;
    }

    public void setProductspecname(String productspecname) {
        this.productspecname = productspecname;
    }

    @Column(name = "PRODUCTSPECVERSION")
    @Id
    public String getProductspecversion() {
        return productspecversion;
    }

    public void setProductspecversion(String productspecversion) {
        this.productspecversion = productspecversion;
    }

    @Column(name = "ACTIONTYPE")
    @Id
    public String getActiontype() {
        return actiontype;
    }

    public void setActiontype(String actiontype) {
        this.actiontype = actiontype;
    }

    @Column(name = "DESTFACTORYNAME")
    @Id
    public String getDestfactoryname() {
        return destfactoryname;
    }

    public void setDestfactoryname(String destfactoryname) {
        this.destfactoryname = destfactoryname;
    }

    @Column(name = "DESTPRODUCTSPECNAME")
    @Id
    public String getDestproductspecname() {
        return destproductspecname;
    }

    public void setDestproductspecname(String destproductspecname) {
        this.destproductspecname = destproductspecname;
    }

    @Column(name = "DESTPRODUCTSPECVERSION")
    @Id
    public String getDestproductspecversion() {
        return destproductspecversion;
    }

    public void setDestproductspecversion(String destproductspecversion) {
        this.destproductspecversion = destproductspecversion;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MesCtPospairproductPK that = (MesCtPospairproductPK) o;

        if (factoryname != null ? !factoryname.equals(that.factoryname) : that.factoryname != null) return false;
        if (productspecname != null ? !productspecname.equals(that.productspecname) : that.productspecname != null)
            return false;
        if (productspecversion != null ? !productspecversion.equals(that.productspecversion) : that.productspecversion != null)
            return false;
        if (actiontype != null ? !actiontype.equals(that.actiontype) : that.actiontype != null) return false;
        if (destfactoryname != null ? !destfactoryname.equals(that.destfactoryname) : that.destfactoryname != null)
            return false;
        if (destproductspecname != null ? !destproductspecname.equals(that.destproductspecname) : that.destproductspecname != null)
            return false;
        if (destproductspecversion != null ? !destproductspecversion.equals(that.destproductspecversion) : that.destproductspecversion != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = factoryname != null ? factoryname.hashCode() : 0;
        result = 31 * result + (productspecname != null ? productspecname.hashCode() : 0);
        result = 31 * result + (productspecversion != null ? productspecversion.hashCode() : 0);
        result = 31 * result + (actiontype != null ? actiontype.hashCode() : 0);
        result = 31 * result + (destfactoryname != null ? destfactoryname.hashCode() : 0);
        result = 31 * result + (destproductspecname != null ? destproductspecname.hashCode() : 0);
        result = 31 * result + (destproductspecversion != null ? destproductspecversion.hashCode() : 0);
        return result;
    }
}
